
// <copyright file="Triplet.cs" company="Subhadra Software Solutions">
//   
// </copyright>
// <summary>
//   The triplet.
// </summary>

namespace SubhadraSolutions.Sharp.Utils.Collections.Generic
{
    /// <summary>
    /// The triplet.
    /// </summary>
    /// <typeparam name="T1">
    /// The type of the 1.
    /// </typeparam>
    /// <typeparam name="T2">
    /// The type of the 2.
    /// </typeparam>
    /// <typeparam name="T3">
    /// The type of the 3.
    /// </typeparam>
    public class Triplet<T1, T2, T3> : Pair<T1, T2>
    {
        #region Constructors and Finalizers

        /// <summary>
        /// Initializes a new instance of the <see cref="Triplet{T1,T2,T3}"/> class.
        /// </summary>
        public Triplet()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Triplet{T1,T2,T3}"/> class.
        /// </summary>
        /// <param name="first">
        /// The first.
        /// </param>
        /// <param name="second">
        /// The second.
        /// </param>
        /// <param name="third">
        /// The third.
        /// </param>
        public Triplet(T1 first, T2 second, T3 third)
            : base(first, second)
        {
            this.Third = third;
        }

        #endregion Constructors and Finalizers

        #region Public Properties

        /// <summary>
        /// Gets or sets the third.
        /// </summary>
        public T3 Third { get; set; }

        #endregion Public Properties

        #region Public Methods and Operators

        /// <summary>
        /// The create new.
        /// </summary>
        /// <param name="first">
        /// The first.
        /// </param>
        /// <param name="second">
        /// The second.
        /// </param>
        /// <param name="third">
        /// The third.
        /// </param>
        /// <returns>
        /// The <see cref="Triplet"/>.
        /// </returns>
        public static Triplet<T1, T2, T3> CreateNew(T1 first, T2 second, T3 third)
        {
            return new Triplet<T1, T2, T3>(first, second, third);
        }

        #endregion Public Methods and Operators
    }

    /// <summary>
    /// The triplet.
    /// </summary>
    /// <typeparam name="T">
    /// </typeparam>
    public class Triplet<T> : Triplet<T, T, T>
    {
    }
}